import request from '@/utils/request'

/**
 * 登录
 * @param params
 */
export function loginAPI (params) {
  // request.headers['need-token'] = false
  return request({
    url: '/auth/login',
    method: 'post',
    data: params
  })
}

/**
 * 退出登录
 */
export function logoutAPI () {
  return request({
    url: '/auth/logout',
    method: 'post',
    data: {}
  })
}

/**
 * 获取登录人信息
 */
export function getLoginUserAPI () {
  return request({
    url: '/auth/get',
    method: 'post',
    data: {}
  })
}

/**
 * 获取登录人授权信息
 * @param params
 */
export function getLoginUserAuthAPI (params) {
  return request({
    url: '/auth/getAuth',
    method: 'post',
    data: params
  })
}
